home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Guided Tour of Multimedia (Second Edition)
/
The Guided Tour of Multimedia (Second Edition).iso
/
trials
/
director
/
evalcopy
/
director.z
/
NAVIGATR.DIR
/
00384_Field_384.txt
< prev
next >
Wrap
Text File
|
1994-06-14
|
1KB
|
30 lines
MECH , 79 , "aBall" parent script, the birth handler
--¥¥ The Ball script ¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
global gConstrainSprite,gHandCursor
property mySprite, velocityV, velocityH,ground ,vacArea, soundNum,Â
myPosition,myPartsList,vacSuction,inSuction, lastPartTouched,Â
maxParts,gravityConst
on birth me , ballSprite , thePartsList
-- Declare instance attributes of new ball.
set soundNum = 1
set inSuction = FALSE
Set mySprite = ballSprite -- In which channel is this ball located.
set gravityConst = 16
mSetHorzVelocity me,0
mSetVertVelocity me,1
set vacSuction = 10
set lastPartTouched = 0
set maxParts = 0 -- 1 greater then total on board,
--
puppetSprite ballSprite, TRUE -- set up sprite number to work with
set the type of sprite ballSprite to 1 -- actor = bitmap
set the ink of sprite ballSprite to 8 -- matte mode
put the height of sprite ballSprite into ballHeight
set vacArea = the bottom of sprite gConstrainSprite - 2*(ballHeight)
set ground = the bottom of sprite gConstrainSprite - ballHeight/2
set myPartsList = thePartsList
set the cursor of sprite mySprite = gHandCursor
return me
end birth